package com.headingdata.loop;

public class WhileDemo3 {
    public static void main(String[] args) {
        int i = 0;
        while (i < 10){
            System.out.println("Hello World" + i);
            i++;
        }

        //需求：珠峰高度：8848860mm,加入一张纸厚度0.1毫米，最少需要折叠多少次可以超过珠峰高度
        double mountainHeight = 8848860;
        double paperHeight = 0.1;
        int count = 0;
        while (mountainHeight >= paperHeight){
            count++;
            paperHeight = paperHeight * 2;
        }
        System.out.println(count);
        System.out.println(paperHeight);
    }
}
